package utils;

/**
 * Created by IntelliJ IDEA.
 * User: Shawn
 * Date: 2009-6-23
 * Time: 22:27:06
 */
public class PageUtils {

  public static int getPage(int page) {
    return page == 0 ? 1 : page;
  }

  public static long getFrom(int page) {
    return page == 1 ? 0 : (page - 1) * Var.PAGE_LENGTH;
  }
}
